//
//  RechargeViewController.m
//  firstpoint
//
//  Created by 泽中 on 2017/7/19.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "RechargeViewController.h"
#import "ChongZhiTiXianView.h"
#import "ChongZhiButton.h"
#import "ZHCZViewController.h"
#import "ShouZhiMingXiViewController.h"
@interface RechargeViewController ()

@end

@implementation RechargeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"余额";
    self.view.backgroundColor=LRRGBColor(235, 240, 242);
    [self setUI];
}
-(void)setUI
{
    UIImageView*imgView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 64, width_screen, 135)];
    imgView.image=[UIImage imageNamed:@""];
    imgView.userInteractionEnabled=YES;
    imgView.backgroundColor=LRRGBColor(46, 165, 117);
    [self.view addSubview:imgView];
    
    //分割线
    UIView*fengeview=[[UIView alloc]initWithFrame:CGRectMake(width_screen/2-0.5, 17, 1, imgView.mj_h-34)];
    fengeview.backgroundColor=[UIColor whiteColor];
    [imgView addSubview:fengeview];
    // 账户元宝
    ChongZhiTiXianView*yuanbaoView=[[ChongZhiTiXianView alloc]initWithFrame:CGRectMake(0, 0, width_screen/2-0.5, 135)];
    yuanbaoView.titleLab.text=@"元宝充值";
    yuanbaoView.numLab.text=@"268";
    [yuanbaoView.mingxiButton addTarget:self action:@selector(yuanbaoButtonClick) forControlEvents:UIControlEventTouchUpInside];
    [imgView addSubview:yuanbaoView];
    //账户金币
    ChongZhiTiXianView*jinbiView=[[ChongZhiTiXianView alloc]initWithFrame:CGRectMake(width_screen/2+0.5, 0, width_screen/2-0.5, 135)];
    [jinbiView.mingxiButton addTarget:self action:@selector(yuanbaoButtonClick) forControlEvents:UIControlEventTouchUpInside];

    jinbiView.titleLab.text=@"金币充值";
    jinbiView.numLab.text=@"32";
    [imgView addSubview:jinbiView];
    
   //充值按钮
    ChongZhiButton*chongzhiButton=[[ChongZhiButton alloc]initWithFrame:CGRectMake(0, 210, width_screen, 45)];
    chongzhiButton.imgView.image=[UIImage imageNamed:@"shdcz"];
    chongzhiButton.label.text=@"充值";
    [chongzhiButton.button addTarget:self action:@selector(chongzhiButtonClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:chongzhiButton];
    //提现按钮
    ChongZhiButton*tixianButton=[[ChongZhiButton alloc]initWithFrame:CGRectMake(0, 256, width_screen, 45)];
    tixianButton.imgView.image=[UIImage imageNamed:@"shdtx"];
    tixianButton.label.text=@"提现";
    [tixianButton.button addTarget:self action:@selector(tixianButtonClick) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:tixianButton];

}
-(void)chongzhiButtonClick
{
    ZHCZViewController*vc=[ZHCZViewController new];
    [self.navigationController pushViewController:vc animated:YES];
}
-(void)tixianButtonClick
{

}
//元宝明细
-(void)yuanbaoButtonClick
{
    ShouZhiMingXiViewController*vc=[ShouZhiMingXiViewController new];
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
